package main

import (
	"fmt"
	"github.com/llightos/efind"
)

var EtcdAddr = "127.0.0.1:2379"

func main() {
	getserver()
}

func getserver() {
	client := efind.NewClient(efind.Config{
		EtcdAddr: EtcdAddr,
		TTL:      5,
	})
	fmt.Println("获取零信任网关Leader节点")
	server, _ := client.MatchAServer("/etcd/gataway")
	fmt.Println(server)
	//fmt.Println("获取密钥中心Leader节点")
	//server, err = client.MatchAServer("/etcd/keycenter")
	//fmt.Println(server)
	//if err != nil {
	//	log.Println(err)
	//	return
	//}
	//fmt.Println(server)
}
